package com.googlecode.bip.chart;

import java.io.Serializable;
import java.util.Calendar;

/**
 * Default implementation of {@link DatePeriodStep}
 */
public class DatePeriodStepImpl implements DatePeriodStep, Serializable
{
    private static final long serialVersionUID = 1L;
    private int stepCalendarField;
    private int stepCalendarAmount;

    /**
     * Iterate every days in period
     */
    public final static DatePeriodStep INC_DAY
        = new DatePeriodStepImpl( Calendar.DAY_OF_MONTH, 1 );

    /**
     *
     */
    public DatePeriodStepImpl(
        final int stepCalendarField,
        final int stepCalendarAmount
        )
    {
        this.stepCalendarField  = stepCalendarField;
        this.stepCalendarAmount = stepCalendarAmount;
    }

    @Override
    public int stepCalendarField()
    {
        return stepCalendarField;
    }

    @Override
    public int stepCalendarAmount()
    {
        return stepCalendarAmount;
    }

}
